﻿using ASPItalia.ModelVirtualCasting.Common;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace ASPItalia.ModelVirtualCasting.Test
{
    [TestClass]
    public class ApplicationContextTest
    {
        private TestContext _testContextInstance;

        public TestContext TestContext
        {
            get { return _testContextInstance; }
            set { _testContextInstance = value; }
        }

        public ApplicationContextTest()
        {
        }

        [ClassInitialize()]
        public static void Initialize(TestContext testContext)
        {
        }

        [ClassCleanup()]
        public static void Cleanup()
        {
        }

        [TestInitialize()]
        public void TestInitialize()
        {
        }

        [TestCleanup()]
        public void TestCleanup()
        {
        }

        [TestMethod]
        public void CandidateRepositoryTest()
        {
            ICandidateRepository repository = ApplicationContext.Current.Candidates;
            Assert.AreEqual("ASPItalia.ModelVirtualCasting.Fake.CandidateRepository", repository.ToString());
        }

        [TestMethod]
        public void ModelRepositoryTest()
        {
            IModelRepository repository = ApplicationContext.Current.Models;
            Assert.AreEqual("ASPItalia.ModelVirtualCasting.Fake.ModelRepository", repository.ToString());
        }

        [TestMethod]
        public void NewsRepositoryTest()
        {
            INewsRepository repository = ApplicationContext.Current.News;
            Assert.AreEqual("ASPItalia.ModelVirtualCasting.Fake.NewsRepository", repository.ToString());
        }

        [TestMethod]
        public void RequestRepositoryTest()
        {
            IRequestRepository repository = ApplicationContext.Current.Requests;
            Assert.AreEqual("ASPItalia.ModelVirtualCasting.Fake.RequestRepository", repository.ToString());
        }

        [TestMethod]
        public void CountryRepositoryTest()
        {
            ICountryRepository repository = ApplicationContext.Current.Countries;
            Assert.AreEqual("ASPItalia.ModelVirtualCasting.Fake.CountryRepository", repository.ToString());
        }

        [TestMethod]
        public void JobLevelRepositoryTest()
        {
            IJobLevelRepository repository = ApplicationContext.Current.JobLevels;
            Assert.AreEqual("ASPItalia.ModelVirtualCasting.Fake.JobLevelRepository", repository.ToString());
        }

        [TestMethod]
        public void JobTypeRepositoryTest()
        {
            IJobTypeRepository repository = ApplicationContext.Current.JobTypes;
            Assert.AreEqual("ASPItalia.ModelVirtualCasting.Fake.JobTypeRepository", repository.ToString());
        }

        [TestMethod]
        public void LanguageRepositoryTest()
        {
            ILanguageRepository repository = ApplicationContext.Current.Languages;
            Assert.AreEqual("ASPItalia.ModelVirtualCasting.Fake.LanguageRepository", repository.ToString());
        }
    }
}
